package com.ytkj.digitalConstruction.enums.user;

public enum UserRedisKeyPrefixEnum {

	/** 用户id */
	USER_ID("userId:"),
	/** 用户信息 */
	USER("user:");
	/** 枚举项的值 */
	String value;

	UserRedisKeyPrefixEnum(String value) {
		this.value = value;
	}

	/**
	 * @desc 获取枚举类型对用的值
	 * @return 枚举项对应的值
	 */
	public String getValue() {
		return value;
	}

	public UserRedisKeyPrefixEnum getByValue(String value) {
		for (UserRedisKeyPrefixEnum status : UserRedisKeyPrefixEnum.values()) {

			if (status.value == value) {
				return status;
			}
		}
		throw new IllegalArgumentException("No element matches " + value);
	}
}
